diff options
author | UbitUmarov | 2016-08-22 07:14:33 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-22 07:14:33 +0100 |
commit | cc322861ca3857b56da391f74714162e630303d9 (patch) | |
tree | 289ddb1c0ed8c77d33cfb5eda249800921cd96a0 /OpenSim/Region/OptionalModules | |
parent | locking issue (diff) | |
download | opensim-SC_OLD-cc322861ca3857b56da391f74714162e630303d9.zip opensim-SC_OLD-cc322861ca3857b56da391f74714162e630303d9.tar.gz opensim-SC_OLD-cc322861ca3857b56da391f74714162e630303d9.tar.bz2 opensim-SC_OLD-cc322861ca3857b56da391f74714162e630303d9.tar.xz |
minor locking issue
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs index 5b9a5b5..941379f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs | |||
@@ -270,7 +270,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
270 | 270 | ||
271 | public void Close() | 271 | public void Close() |
272 | { | 272 | { |
273 | |||
274 | m_log.InfoFormat("[IRC-Connector-{0}] Closing", idn); | 273 | m_log.InfoFormat("[IRC-Connector-{0}] Closing", idn); |
275 | 274 | ||
276 | lock (msyncConnect) | 275 | lock (msyncConnect) |
@@ -295,7 +294,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
295 | } | 294 | } |
296 | catch (Exception) { } | 295 | catch (Exception) { } |
297 | 296 | ||
298 | |||
299 | m_connected = false; | 297 | m_connected = false; |
300 | 298 | ||
301 | try { m_writer.Close(); } | 299 | try { m_writer.Close(); } |
@@ -308,10 +306,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
308 | catch (Exception) { } | 306 | catch (Exception) { } |
309 | 307 | ||
310 | } | 308 | } |
311 | |||
312 | lock (m_connectors) | 309 | lock (m_connectors) |
313 | m_connectors.Remove(this); | 310 | m_connectors.Remove(this); |
314 | |||
315 | } | 311 | } |
316 | } | 312 | } |
317 | 313 | ||
@@ -327,25 +323,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
327 | 323 | ||
328 | public void Connect() | 324 | public void Connect() |
329 | { | 325 | { |
330 | |||
331 | if (!m_enabled) | 326 | if (!m_enabled) |
332 | return; | 327 | return; |
333 | 328 | ||
334 | // Delay until next WD cycle if this is too close to the last start attempt | 329 | // Delay until next WD cycle if this is too close to the last start attempt |
335 | 330 | if(_icc_ < ICCD_PERIOD) | |
336 | while (_icc_ < ICCD_PERIOD) | ||
337 | return; | 331 | return; |
338 | 332 | ||
339 | m_log.DebugFormat("[IRC-Connector-{0}]: Connection request for {1} on {2}:{3}", idn, m_nick, m_server, m_ircChannel); | 333 | m_log.DebugFormat("[IRC-Connector-{0}]: Connection request for {1} on {2}:{3}", idn, m_nick, m_server, m_ircChannel); |
340 | 334 | ||
335 | _icc_ = 0; | ||
336 | |||
341 | lock (msyncConnect) | 337 | lock (msyncConnect) |
342 | { | 338 | { |
343 | |||
344 | _icc_ = 0; | ||
345 | |||
346 | try | 339 | try |
347 | { | 340 | { |
348 | |||
349 | if (m_connected) return; | 341 | if (m_connected) return; |
350 | 342 | ||
351 | m_connected = true; | 343 | m_connected = true; |
@@ -379,11 +371,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
379 | // expires. By leaving them as they are, the connection will be retried | 371 | // expires. By leaving them as they are, the connection will be retried |
380 | // when the login timeout expires. Which is preferred. | 372 | // when the login timeout expires. Which is preferred. |
381 | } | 373 | } |
382 | |||
383 | } | 374 | } |
384 | 375 | ||
385 | return; | 376 | return; |
386 | |||
387 | } | 377 | } |
388 | 378 | ||
389 | // Reconnect is used to force a re-cycle of the IRC connection. Should generally | 379 | // Reconnect is used to force a re-cycle of the IRC connection. Should generally |