|
@@ -1175,17 +1175,23 @@ public class Server extends WritableFrameContainer implements
|
1175
|
1175
|
* Updates the name and title of this window.
|
1176
|
1176
|
*/
|
1177
|
1177
|
public void updateTitle() {
|
1178
|
|
- synchronized (parserLock) {
|
1179
|
|
- final Object[] arguments = new Object[]{
|
1180
|
|
- address.getHost(), parser == null ? "Unknown" : parser.getServerName(),
|
1181
|
|
- address.getPort(), parser == null ? "Unknown" : getNetwork(),
|
1182
|
|
- parser == null ? "Unknown" : parser.getLocalClient().getNickname()
|
1183
|
|
- };
|
1184
|
|
-
|
1185
|
|
- setName(Formatter.formatMessage(getConfigManager(),
|
1186
|
|
- "serverName", arguments));
|
1187
|
|
- window.setTitle(Formatter.formatMessage(getConfigManager(),
|
1188
|
|
- "serverTitle", arguments));
|
|
1178
|
+ synchronized (myStateLock) {
|
|
1179
|
+ if (myState.getState() == ServerState.CLOSING) {
|
|
1180
|
+ return;
|
|
1181
|
+ }
|
|
1182
|
+
|
|
1183
|
+ synchronized (parserLock) {
|
|
1184
|
+ final Object[] arguments = new Object[]{
|
|
1185
|
+ address.getHost(), parser == null ? "Unknown" : parser.getServerName(),
|
|
1186
|
+ address.getPort(), parser == null ? "Unknown" : getNetwork(),
|
|
1187
|
+ parser == null ? "Unknown" : parser.getLocalClient().getNickname()
|
|
1188
|
+ };
|
|
1189
|
+
|
|
1190
|
+ setName(Formatter.formatMessage(getConfigManager(),
|
|
1191
|
+ "serverName", arguments));
|
|
1192
|
+ window.setTitle(Formatter.formatMessage(getConfigManager(),
|
|
1193
|
+ "serverTitle", arguments));
|
|
1194
|
+ }
|
1189
|
1195
|
}
|
1190
|
1196
|
}
|
1191
|
1197
|
|