summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWinSock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index c71aa96..cc77afe 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -2052,7 +2052,6 @@ Tcl_OpenTcpServer(
char channelName[SOCK_CHAN_LENGTH];
u_long flag = 1; /* Indicates nonblocking mode. */
const char *errorMsg = NULL;
- ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey);
if (TclpHasSockets(interp) != TCL_OK) {
return NULL;
@@ -2168,6 +2167,7 @@ error:
}
if (statePtr != NULL) {
+ ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey);
statePtr->acceptProc = acceptProc;
statePtr->acceptProcData = acceptProcData;