Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8800631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:38:23+00:00 2026-06-14T00:38:23+00:00

First I will give you the code, then the error, then some type information.

  • 0

First I will give you the code, then the error, then some type information. The questions are these: How can I figure out what is going on? How might I fix the problem?

readTask = do
   req' <-  parseUrl "https://10.64.251.32/rest/api/latest/issue/BNAP-291"
   manager <- newManager manSettings
   let req'' = applyBasicAuth (pack "sandboxer") (pack "sandboxer") req'
   Response _ _ _ body <-runResourceT $ http req'' manager 
   pBody <- runResourceT $
            body $$+- sinkParser json

   --   print pBody
   --   closeManager manager

   return ()
      where manSettings =
               def
                 { managerCheckCerts = \ _ _ -> return CertificateUsageAccept }

This compiles fine. Here’s what happens when I run the compiled code

dist/build/Spike/Spike
Spike: <socket: 3>: hGetBuf: illegal operation (handle is closed)

body is the following type

Data.Conduit.Internal.ResumableSource
(Control.Monad.Trans.Resource.ResourceT IO)
Data.ByteString.Internal.ByteString

Feedback appreciated, I don’t know how to begin troubleshooting this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:38:24+00:00Added an answer on June 14, 2026 at 12:38 am

    The first runResourceT call is closing the socket before the body is parsed. You will need to combine the two runResourceT calls into one. ResourceT is a Monad instance so you can use do notation and some minor surgery to free the socket after parsing is complete:

    readTask = do
       req' <-  parseUrl "https://10.64.251.32/rest/api/latest/issue/BNAP-291"
       manager <- newManager manSettings
       let req'' = applyBasicAuth (pack "sandboxer") (pack "sandboxer") req'
       runResourceT $ do
          Response _ _ _ body <- http req'' manager 
          pBody <- body $$+- sinkParser json
          liftIO $ print pBody
    
       closeManager manager
    
       return ()
          where manSettings =
                   def
                     { managerCheckCerts = \ _ _ -> return CertificateUsageAccept }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will first illustrate my issue with some code: class ExampleClass { private Vector2
This is easier to explain with some code so I'll give an example first:
I want to define that the first element will be of a specific type,
Hey everyone, I am getting a heap corruption error I cannot figure out. char
I have defined some models like this (Entity Framework Code-First): public class A {
First I will try to explain what I want to do. The app loads
First I will explain what I am trying to do. I am trying to
I have a CSV file. The first row will always contain column headers. Depending
I have two desktop applications. After closing the first application, the first application will
I want to display a UITableView with Multiple Columns. The first column will have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.