diff --git a/src/io.c b/src/io.c
index 4d76a11..40eac1c 100644
--- a/src/io.c
+++ b/src/io.c
@@ -51,7 +51,10 @@
         return 0;
     }
 
-    switch(session->ti_type) {
+    switch (session->ti_type) {
+    case NC_TI_NONE:
+        return 0;
+
     case NC_TI_FD:
         /* read via standard file descriptor */
         while(count) {
@@ -253,10 +256,13 @@
 #endif
     }
 
-    while(1) {
+    while (1) {
         /* poll loop */
 
-        switch(session->ti_type) {
+        switch (session->ti_type) {
+        case NC_TI_NONE:
+            return NC_MSG_ERROR;
+
 #ifdef ENABLE_SSH
         case NC_TI_LIBSSH:
             /* we are getting data from libssh's channel */
@@ -461,6 +467,9 @@
     char chunksize[20];
 
     switch (session->ti_type) {
+    case NC_TI_NONE:
+        return -1;
+
     case NC_TI_FD:
         if (session->version == NC_VERSION_11) {
             c = dprintf(session->ti.fd.out, "\n#%zu\n", count);
@@ -493,6 +502,9 @@
 write_endtag(struct nc_session *session)
 {
     switch(session->ti_type) {
+    case NC_TI_NONE:
+        return 0;
+
     case NC_TI_FD:
         if (session->version == NC_VERSION_11) {
             write(session->ti.fd.out, "\n##\n", 4);
@@ -587,6 +599,9 @@
         content = va_arg(ap, struct lyd_node *);
         attrs = va_arg(ap, const char *);
         switch (session->ti_type) {
+        case NC_TI_NONE:
+            return -1;
+
         case NC_TI_FD:
             dprintf(session->ti.fd.out, "<rpc xmlns=\"%s\" message-id=\"%"PRIu64"\"%s>",
                     NC_NS_BASE, session->msgid + 1, attrs ? attrs : "");
@@ -620,6 +635,9 @@
     case NC_MSG_REPLY:
         rpc = va_arg(ap, struct nc_server_rpc *);
         switch (session->ti_type) {
+        case NC_TI_NONE:
+            return -1;
+
         case NC_TI_FD:
             write(session->ti.fd.out, "<rpc-reply", 10);
             lyxml_dump_fd(session->ti.fd.out, rpc->root, LYXML_DUMP_ATTRS);
@@ -653,6 +671,9 @@
 
     case NC_MSG_NOTIF:
         switch (session->ti_type) {
+        case NC_TI_NONE:
+            return -1;
+
         case NC_TI_FD:
             write(session->ti.fd.out, "<notification xmlns=\""NC_NS_NOTIF"\"/>", 21 + 47 + 3);
 
@@ -685,6 +706,9 @@
         capabilities = va_arg(ap, const char **);
         sid = va_arg(ap, uint32_t*);
         switch (session->ti_type) {
+        case NC_TI_NONE:
+            return -1;
+
         case NC_TI_FD:
             dprintf(session->ti.fd.out, "<hello xmlns=\"%s\"><capabilities>", NC_NS_BASE);
             for (i = 0; capabilities[i]; i++) {
